/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-09-08
 * Time: 19:35
 */
import java.util.Scanner;

public class RealWorldTime {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        // 读取输入
        String inputTime = scanner.next();
        int k = scanner.nextInt();
        // 调用方法计算真实时间
        String realTime = calculateRealTime(inputTime, k);
        // 输出结果
        System.out.println(realTime);
    }

    public static String calculateRealTime(String inputTime, int k) {
        // 解析时间
        String[] parts = inputTime.split(":");
        int hours = Integer.parseInt(parts[0]);
        int minutes = Integer.parseInt(parts[1]);
        int seconds = Integer.parseInt(parts[2]);

        // 转换为总秒数
        int totalSeconds = hours * 3600 + minutes * 60 + seconds;

        // 加上异世界与真实世界的时差
        totalSeconds += k;

        // 处理超过24小时的情况
        int hoursAfterAdjustment = totalSeconds / 3600;
        int remainingSeconds = totalSeconds % 3600;

        // 转换回时分秒格式
        int minutesAfterAdjustment = remainingSeconds / 60;
        int secondsAfterAdjustment = remainingSeconds % 60;

        // 格式化输出
        String formattedHours = String.format("%02d", hoursAfterAdjustment % 24);
        String formattedMinutes = String.format("%02d", minutesAfterAdjustment);
        String formattedSeconds = String.format("%02d", secondsAfterAdjustment);

        return formattedHours + ":" + formattedMinutes + ":" + formattedSeconds;
    }
}
